#
# fuqiyang, owned by pear
#
#

# 1. compile options
#
CP_GCC := gcc
CP_CLFAGS := -lz -lpthread
CP_MAKE := make
RM_FORCE := rm -rf

# 2. lib options
#
PR_LIBS := libprlog/libprlog.a  libprtar/libprtar.a


# 4. pear demo options
#
PR_OBJS := demo.o
PR_TARGET := demo

# 5. makefile
#
${PR_TARGET} : ${PR_OBJS} ${PR_LIBS}
	${CP_GCC} $^ ${CP_CLFAGS}  -o $@


${PR_LIBS} : 
	${CP_MAKE} -C libprlog
	${CP_MAKE} -C libprtar


.o : .c
	${CP_GCC} -c $< -o $@


.PHONY : clean
clean:
	${CP_MAKE} -C libprlog clean
	${CP_MAKE} -C libprtar clean
	${RM_FORCE} ${PR_TARGET} ${PR_OBJS}



